<!DOCTYPE html>
<html class="ui-page-login">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>客户</title>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="css/style.css" rel="stylesheet" />
		<link href="css/reg_style.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/mui.picker.min.css" />
		<link rel="stylesheet" type="text/css" href="css/ljq.css" />
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<link rel="stylesheet" type="text/css" href="css/ljq-post.css"/>
		<style>
			.tupian {
				position: fixed;
				top: 0;
				width: 100%;
				z-index: 99;
			}
			
			.head2{
				position: relative;
				width:100%;
				height: 44px;
			}
			.head2 .div2{
				width: 100%;
				padding:0 0.25rem;
				text-align: center;
			}
			.head2 .img1{
				/*margin-left: 0.03rem;*/
				position: absolute;
				margin:0;
				left: 0.1rem;
				top:50%;
				transform: translateY(-50%);
			}
			.head2 .img2{
				/*margin-right: 0.03rem;*/
				position: absolute;
				margin:0;
				right: 0.1rem;
				top:50%;
				transform: translateY(-50%);
			}
			
			.lan {
				width: 100%;
				height: 0.85rem;
				background: url(img/beijing.png)no-repeat center center;
			}
			
			.bai {
				width: 100%;
				background: #fff;
				border-bottom: 1px solid #eee;
			}
			
			.menu {
				position: absolute;
				left: 5%;
				top: 0.6rem;
				width: 90%;
				background: #fff;
				border-radius: 5px;
				box-shadow: 2px 2px 2px rgba(65, 152, 255, 0.2);
			}
			
			.yiye .menu span {
				float: left;
				width: 50%;
				text-align: center;
				font-size: 0.15rem;
				margin-top: 0.13rem;
				margin-bottom: 0.13rem;
				color: #808080;
			}
			
			.yiye .fenxi1 {
				width: 100%;
				padding-top: 0.2rem;
				padding-bottom: 0.12rem;
				background: #fff;
			}
			
			.yiye .fenxi1 div {
				float: left;
				width: 33%;
				text-align: center;
				margin-top: 0.15rem;
			}
			
			.yiye .fenxi1 span {
				display: block;
				font-size: 0.1rem;
				color: #808080;
				margin-bottom: 0.1rem;
			}
			
			.yiye .fenxi1 em {
				display: block;
				font-size: 0.2rem;
				color: #4D4D4D;
			}
			/*所有客户---搜索框*/
			
			.yiye .search {
				width: 90%;
				margin: 0 auto;
				padding-top: 0.4rem!important;
			}
			
			.yiye .mui-search .mui-placeholder {
				text-align: left;
				color: #fff;
				background: #F2F2F2;
			}
			
			.yiye .search .div1 {
				margin-bottom: 0.1rem;
			}
			
			.yiye .search .div1 .em1 {
				font-size: 0.13rem;
				color: #4D4D4D;
				background: #eee;
				padding: 0.02rem 0.03rem;
				margin-left: 0.02rem;
				border-radius: 5px;
				display: inline-block;
			}
			
			.yiye .search span {
				color: #ccc;
				font-size: 0.13rem;
			}
			
			.yiye .search em {
				color: #4D4D4D;
				font-size: 0.13rem;
			}
			
			.yiye .mui-icon-search:before {
				margin-left: 0.15rem;
				margin-right: 0.15rem;
			}
			/*所有客户---会员信息*/
			
			.yiye ul {
				/*padding-top: 2.1rem;*/
			}
			
			.yiye ul li {
				padding-right: 0!important;
			}
			
			.yiye ul .img1 {
				display: block;
				width: 0.38rem;
				height: 0.38rem;
				border-radius: 50%;
				margin-top: 0.07rem;
			}
			
			.yiye ul .appraise {
				margin-top: 0.07rem;
			}
			
			.yiye ul .appraise img {
				float: left;
				width: 0.07rem;
				height: 0.07rem;
			}
			
			.yiye ul .kehuxinxi {
				margin-left: 0.5rem;
			}
			
			.yiye .kehuxinxi .xingming {
				font-size: 0.13rem;
				color: #ccc;
			}
			
			.yiye .kehuxinxi .xingming em {
				float: left;
				margin-left: 0.05rem;
				padding: 0.001rem 0.04rem;
			}
			
			.yiye .kehuxinxi .xingming .em1 {
				margin-left: 0;
				color: #4D4D4D;
				margin-top: 0.035rem;
				padding: 0.001rem 0;
			}
			
			.yiye .kehuxinxi .xingming img {
				float: left;
				height: 0.11rem;
				margin-left: 0.05rem;
				margin-top: 0.06rem;
			}
			
			.yiye .kehuxinxi .xingming .img10 {
				float: left;
				height: 0.1rem;
				margin-left: 0.05rem;
				margin-top: 0.07rem;
			}
			
			.yiye .kehuxinxi .xiaofei {
				margin-top: 0.06rem;
				width: 100%;
			}
			
			.yiye .kehuxinxi .xiaofei .span1 {
				float: left;
				font-size: 0.1rem;
				color: #ccc;
			}
			
			.yiye .kehuxinxi .xiaofei .span2 {
				float: right;
				font-size: 0.1rem;
				color: #ccc;
				background: url(img/xiangyou.png)no-repeat center right;
				background-size: 0.1rem;
				padding-right: 0.15rem;
			}
			
			.yiye .kehuxinxi .xiaofei em {
				color: #4D4D4D;
				font-size: 0.13rem
			}
			
			.yiye .kehuxinxi .zuijin {
				margin-top: 0.06rem;
				font-size: 0.1rem;
				color: #ccc;
			}
			
			.mui-table-view:after {
				background-color: #fff!important;
			}
			/*搜索*/
			
			.erye .lishi {
				margin-top: 0.15rem;
			}
			
			.erye .lishi h4 {
				float: left;
				color: #ccc!important;
				margin-left: 4%;
				font-size: 0.12rem!important;
				padding-top: 0.05rem;
			}
			
			.erye .lishi span {
				color: #808080!important;
				float: right;
				font-size: 0.09rem;
				margin-right: 3%;
				padding-top: 0.1rem;
			}
			
			.erye .lishiresult {
				margin-top: 0.1rem;
			}
			
			.erye .lishiresult em {
				background: #F2F2F2;
				color: #4d4d4d;
				border-radius: 4px;
				margin-left: 2%;
				font-size: 0.1rem;
				padding: 0.03rem 0.06rem;
				display: inline-block;
			}
			/*筛选*/
			
			.sanye .queding {
				display: block;
				width: 85%;
				margin: 0 auto;
				margin-top: 0.25rem;
				font-size: 0.15rem;
				height: 0.4rem;
				padding: 0;
				line-height: 0.4rem!important;
			}
			/*新的电话*/
			
			.active4 {
				color: #FF6A4C!important;
			}
			
			.active5 {
				color: #4198FF!important;
			}
			
			.active {
				background: #CCCCCC;
			}
			
			.active1 {
				background: rgb(250, 106, 76);
			}
			
			.active2 {
				background: rgb(65, 152, 255);
			}
			
			.active3 {
				background: rgb(255, 162, 0);
			}
			
			.erye .head2 {
				height: 0.44rem;
				/*position: static!important;*/
			}
			
			.hr {
				display: block;
				width: 100%;
				background: #F2F2F2!important;
				margin-bottom: 0.2rem;
				height: 0.05rem;
				margin-top: -0.1rem;
			}
			
			.huisesearch {
				display: block;
				width: 100%;
				margin: 0 auto;
				font-size: 0.13rem;
				border-radius: 6px;
				background-color: #F2F2F2;
				height: 0.3rem;
				line-height: 0.3rem;
				padding: 0;
				padding-left: 0.45rem;
				color: #ccc;
				position: relative;
				margin-bottom: 0.1rem;
			}
			
			.huisesearch em {
				display: block;
				width: 0.15rem;
				height: 0.15rem;
				background: url(img/huisesearch.png)no-repeat center center;
				background-size: 0.15rem;
				position: absolute;
				left: 0.15rem;
				top: 0.07rem;
			}
			
			.erye .search {
				float: left;
				width: 2.2rem;
				margin-top: 0.08rem;
				height: 0.25rem;
				border-radius: 6px;
				margin-left: 0.1rem!important;
				position: relative;
				font-size: 0.13rem;
			}
			
			.erye input[type=search] {
				background: url(img/search_banner.png)no-repeat center center!important;
				margin: 0!important;
				text-align: left;
				color: #fff;
				font-size: 0.13rem;
			}
			
			.erye .search em {
				position: absolute;
				top: 0.08rem;
				right: 0.1rem;
				width: 0.13rem;
				height: 0.13rem;
				background: url(img/clear.png)no-repeat center center;
				background-size: 0.13rem;
				opacity: 0.5;
			}
			
			.erye input::-webkit-input-placeholder {
				color: #fff;
				text-align: left;
				font-size: 0.13rem;
				opacity: 0.6;
			}
			
			.erye input::-moz-placeholder {
				color: #fff;
				text-align: left;
				font-size: 0.13rem;
				opacity: 0.6;
			}
			
			.erye input:-ms-input-placeholder {
				color: #fff;
				text-align: left;
				font-size: 0.13rem;
				opacity: 0.6;
			}
			
			.erye .sousuo_span {
				float: right;
				/*background: url(img/sousuo.png)no-repeat center left!important;
						background-size: 0.14rem!important;*/
				display: block;
				color: #fefefe;
				/*padding-left: 0.15rem;*/
				margin-top: 0.15rem;
				margin-right: 0.15rem;
				font-size: 0.15rem;
			}
			
			.erye .quxiao {
				float: left;
				width: 0.15rem;
				height: 0.15rem;
				margin-left: 0.15rem!important;
				margin-top: 0.16rem;
			}
			
			.xialakuang {
				background: url(img/xialakuang1.png)no-repeat top center;
				width: 80%;
				position: fixed;
				left: 10%;
				top: 0.28rem;
				z-index: 111;
				padding-top: 0.1rem;
				border-radius: 15px;
			}
			
			.xialakuang .xiala_span {
				display: block;
				width: 100%;
				height: 0.44rem;
				line-height: 0.44rem;
				text-indent: 0.2rem;
				font-size: 0.15rem;
				color: #4D4D4D;
				background: #fff;
				border-bottom: 1px solid #ccc;
			}
			
			.xiala_span1:first-child {
				border-top-left-radius: 5px;
				border-top-right-radius: 5px;
			}
			
			.xialakuang .add_span {
				display: block;
				width: 100%;
				height: 0.44rem;
				line-height: 0.44rem;
				font-size: 0.15rem;
				background: url(img/jianbian3.png)no-repeat center center;
				color: #fff;
				border-bottom-left-radius: 5px;
				border-bottom-right-radius: 5px;
			}
			
			.xialakuang .add_span img {
				width: 0.15rem;
				margin-left: 0.2rem;
				margin-right: 0.1rem;
			}
			
			.yinying {
				position: fixed;
				left: 0;
				top: 0;
				width: 100%;
				height: 100%;
				background: #000000;
				opacity: 0.3;
				z-index: 100;
			}
			
			.tu_graphic .title1 {
				margin-bottom: -0.15rem;
			}
			
			.tu_graphic .main_graphic {
				height: 1.35rem;
			}
			
			.head20 {
				background: url(img/beijing.png)no-repeat center center;
				width: 100%;
				height: 52px;
			}
			
			.erye .search {
				float: left;
				width: 70%;
				margin-top: 9px;
				height: 0.25rem;
				border-radius: 6px;
				margin-left: 3%!important;
				position: relative;
				font-size: 26px;
			}
			
			.erye .search em {
				position: absolute;
				top: 10px;
				right: 4%;
				width: 0.13rem;
				height: 0.13rem;
				background: url(img/clear.png)no-repeat center center;
				background-size: 0.13rem;
				opacity: 0.5;
			}
			
			.erye .sousuo_span {
				float: right;
				/*background: url(img/sousuo.png)no-repeat center left!important;
						background-size: 0.14rem!important;*/
				display: block;
				color: #fefefe;
				/*padding-left: 0.15rem;*/
				margin-top: 16px;
				margin-right: 4%;
				font-size: 18px;
			}
			
			.erye .quxiao {
				float: left;
				width: 5%;
				height: 0.15rem;
				margin-left: 4%!important;
				margin-top: 16px;
			}
			.mui-table-view .mui-media-object {
				max-width:none;
			}

			#buxianshi {
				position: relative;
			}

			#buxianshi .clearBtn {
				position: absolute;
				display: inline-block;
				width: 0.15rem;
				height: 0.15rem;
				right: 0;
				top: 50%;
				transform: translateY(-50%);
			}
		</style>
	</head>

	<body>
		<div class="fetchmark">
			<img src="svg/oval.svg" width="50" alt="">
		</div>
		<div class="yinying" style="display: none;"></div>
		<div class="xialakuang" id="shoplist_new" style="display: none;">
			<span class="xiala_span xiala_span1" data-shopid="0">demo1</span>
			<span class="add_span xiala_span1" data-shopid="999999"><img src="img/add.png" alt=""/>添加门店</span>
		</div>
		<div class="yiye">
			<div class="tupian">
				<div class="lan">
					<div class="head2">
						<!-- <a class="" href="index_xiaoxi.html"><img class="img1" src="img/xiaoxi1.png" alt="" /></a> -->
						<div class="div2"><span class="span2" id="list-shop-lists"></span></div>
						<img class="img2 tiao_shaixuan" src="img/shaixuan.png" alt="" />
					</div>
				</div>
				<div class="menu clearfix">
					<span id="active5-khfx" style="border-right: 1px solid #F2F2F2;" class="active5" onclick="member_dashboard();">客户分析</span>
					<span id="active5-sykf" onclick="member_lists();">所有客户</span>
				</div>
				<div class="bai">
					<div class="clearfix fenxi1 huan" id="active5-khfx-1">
						<div class="zong">
							<span>总客户</span>
							<em class="active4" id="client-ac-total_customer"></em>
						</div>
						<div class="xin" style="border-left: 1px solid #f2f2f2;">
							<span>老客户</span>
							<em id="client-ac-old_customer"></em>
						</div>
						<div class="hui" style="border-left: 1px solid #f2f2f2;">
							<span>会员</span>
							<em id="client-ac-return_customer"></em>
						</div>
					</div>
					<!--<input type="search" name="" id="" value="" placeholder="aaaaaa"/>-->
					<div class="mui-content-padded search huan" style="display: none;" id="active5-sykf-1">
						<!--<div class="mui-input-row mui-search">
							<input type="search" class="mui-input-clear tiao_sousuo" placeholder="请输入客户姓名或者订单编号">
						</div>-->
						<div class="huisesearch tiao_sousuo">请输入客户姓名、订单编号或手机号码<em></em></div>
						<div class="div1"><span>总客户：</span><em id='client-cs-total_count'></em>
							<span class="buxianshi fuhe" style="margin-left: 10%;display:none">符合条件：</span>
							<em class="buxianshi" style="display:none" id='client-cs-search_count'></em></div>
						<div class="buxianshi div1" id="buxianshi">
							<!--<em class="em1">新客</em><em class="em1">女</em><em class="em1">19-32</em>-->
						</div>
					</div>
				</div>
			</div>

			<div class="mui-content">

				<div>
					<div id="active5-khfx-1" class="div_main1" style="padding-top: 2rem;">
						<!---------------下面都是图表样式------------------------------------------------------>
						<!--<div class="tu_graphic clearfix">
							<div id='client-ac-gct-title' class="title1"></div>
							<div id="client-ac-gct-chart" class="main_graphic"></div>
						</div>-->
						<div id="mychart1" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;"></div>
						<div class="hr"></div>
						<!--<div class="tu_graphic clearfix">
							<div id='client-ac-gcp-title' class="title1"></div>
							<div id="client-ac-gcp-chart" class="main_graphic"></div>
						</div>-->
						<div id="mychart2" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;"></div>
						<div class="hr"></div>
						<!--<div class="tu_graphic clearfix">
							<div id='client-ac-glm-title' class="title1"></div>
							<div id="client-ac-glm-chart" class="main_graphic"></div>
						</div>-->
						<div id="mychart3" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;"></div>
						<div class="hr"></div>
						<!--<div class="tu_graphic clearfix">
							<div id='client-ac-gcr-title' class="title1"></div>
							<div id="client-ac-gcr-chart" class="main_graphic"></div>
						</div>-->
						<div id="mychart4" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;"></div>
						<div class="hr"></div>
						<!--<div class="tu_graphic clearfix">
							<div id='client-ac-gav-title' class="title1"></div>
							<div id="client-ac-gav-chart" class="main_graphic"></div>
						</div>-->
						<div id="mychart5" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;"></div>
						<div class="hr"></div>

						<!---------------下面都是图表样式----饼图-------------->

						<!--//statistics_turnover3a-->
						<div class="clearfix" style="margin-top: -0.3rem;">
							<div class="div_bingtu" style="width: 49%;float: left;border: 0px solid red;margin-left: 1%;">
								<div class="bingtu clearfix">
									<div class="tu_graphic clearfix" style="margin-top: 0.3rem;">
										<div id='client-ac-gcrc-title' class="title1"></div>
										<div id="client-ac-gcrc-chart" class="main_graphic"></div>
									</div>
								</div>
							</div>
							<div class="div_bingtu" style="width: 49%;float: right;border: 0px solid red;margin-right: 1%;">
								<div class="bingtu clearfix">
									<div class="tu_graphic clearfix" style="margin-top: 0.3rem;">
										<div id='client_ac_ggrc_title' class="title1"></div>
										<div id="main_graphic" class="main_graphic"></div>
									</div>
								</div>
							</div>
						</div>
						<div class="hr" style="margin-top: 0.1rem;"></div>
						<!--<div class="tu_graphic clearfix">
							<div id='client-ac-gar-title' class="title1"></div>
							<div id="client-ac-gar-chart" class="main_graphic"></div>
						</div>						-->
						<div id="mychart6" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;"></div>

						<!---------------上面都是图表样式----饼图-------------->

						<div style="height: 0.45rem;background-color: #F2F2F2;border: 0rem solid #000000;margin-top: -0.15rem;">&nbsp;</div>

					</div>
					<div id="active5-sykf-1" class="div_main1" style="display: none;">
						<div id="pullrefresh" class="mui-content mui-scroll-wrapper" style="border:0px solid palevioletred;">
							<div class="mui-scroll" style="border:0px solid #0000CC;">
								<ul class="mui-table-view mui-table-view-chevron ull" id="box_merber_lists">

								</ul>
							</div>
						</div>

						<!--<ul id='box_merber_lists' class="mui-table-view mui-table-view-chevron ull">
							
						</ul>-->
					</div>
				</div>
			</div>
			<nav class="mui-bar mui-bar-tab">
				<a href="index.html" class="mui-tab-item ">
					<span class="mui-icon">
					<img src="img/shouye.png" alt='' />
				</span>
					<span class="mui-tab-label">首页</span>
				</a>
				<a href="store.html" class="mui-tab-item">
					<span class="mui-icon">
					<img src="img/dianpu.png" alt='' />
				</span>
					<span class="mui-tab-label">店铺</span>
				</a>
				<a href="client_searchresult.html" class="mui-tab-item mui-active">
					<span class="mui-icon">
						<img src="img/kehumr.png" alt='' />
					</span>
					<span class="mui-tab-label">客户</span>
				</a>
				<!-- <a href="store_jiankongchakan.html" class="mui-tab-item">
					<span class="mui-icon">
						<img src="img/safeimg.png" alt='' />
					</span>
					<span class="mui-tab-label">安防</span>
				</a> -->
			</nav>

		</div>
		<!-------搜索--------------------------------------------->
		<div class="erye" style="display: none;">
			<div class="head20">
				<img src="img/fanhui1.png" alt="" class="quxiao" />
				<div class="search">

					<input id="xxxx" type="search" class="tiao_sousuo" placeholder="请输入姓名、订单编号或手机号码">
					<em style="display: none;"></em>
				</div>
				<span class="sousuo_span tiao_sousuo" onclick="input_search()">搜索</span>
			</div>
			<div class="mui-content">
				<div class="lishi clearfix">
					<h4>历史搜索</h4>
					<span class=" mui-icon  mui-left qingkong">清空历史</span>
				</div>
				<div class="lishiresult" id="sousuolishi">
					<!--<a class=" mui-icon  mui-left">新客</a>
					<a class=" mui-icon  mui-left">女</a>
					<a class=" mui-icon  mui-left">9-30</a>
					<a class=" mui-icon  mui-left">会员</a>-->
				</div>

			</div>
		</div>

		<!-------筛选------------------------------------------->
		<div class="sanye" style="display: none;">
			<header class="mui-bar mui-bar-nav head1">
				<!--<em class="mui-icon mui-icon-left-nav  mui-pull-left mui-icon-back fanhui" style="padding-top: 5px;font-size: 0.3rem;color:#4198FF;"></em>-->
				<img src="img/fanhui.png" alt="" class="img1 fanhui" style="margin-top: 0.14rem;" />
				<div class="div1" style="margin-top: 0.14rem;"><span class="span0">客户筛选</span></div>
			</header>
			<div class="mui-content">
				<div class="zong">
					<div class="div4 clearfix">
						<span class="span4">客户类型</span>
						<em id="index-type0" onclick="xtype0([{value: 0,text: '全部'},{value: 1,text: '访客'}, {value: 3,text: '老客户'}, {value: 2,text: '新成交'}],'#index-type0');" class="em4">全部</em>
					</div>
					<div class="div4 clearfix">
						<span class="span4">客户性别</span>
						<em id="index-type1" onclick="xtype0([{value: 0,text: '全部'}, {value: 1,text: '男'}, {value: 0,text: '女'}],'#index-type1');" class="em4">全部</em>
					</div>
					<div class=" div4 clearfix">
						<span class="span4">消费次数</span>
						<em id="index-type2" onclick="xtype0([{value: 0,text: '全部'}, {value: 3,text: '2次'}, {value: 4,text: '3次'}, {value: 5,text: '4次'}, {value: 6,text: '5次'}, {value: 7,text: '5次以上'}],'#index-type2');" class="em4">全部</em>
					</div>
					<div class=" div4 clearfix">
						<span class="span4">客户年龄</span>
						<em id="index-type3" onclick="xtype0([{value: 0,text: '全部'},{value: 1,text: '1-6'}, {value: 2,text: '7-17'}, {value: 3,text: '18-40'}, {value: 4,text: '41-65'}, {value: 5,text: '65以上'}],'#index-type3');" class="em4">全部</em>
					</div>
					<div class="div4 clearfix">
						<span class="span4">累计消费金额</span>
						<em id="index-type4" onclick="xtype0([{value: 0,text: '全部'},{value: 1,text: '0-1000'}, {value: 2,text: '1000-3000'}, {value: 3,text: '3000-5000'}, {value: 4,text: '5000-10000'},{value: 5,text: '10000-15000'},{value: 6,text: '15000-20000'}, {value: 7,text: '20000以上'}],'#index-type4');" class="em4">全部</em>
					</div>
					<div class="div4 clearfix">
						<span class="span4">末次消费时间</span>
						<em id="index-type5" onclick="xtype0([{value: 0,text: '全部'}, {value: 1,text: '1个月以内'}, {value: 2,text: '1-3个月'}, {value: 3,text: '3-6个月'}, {value: 4,text: '6-12个月'}],'#index-type5');" class="em4">全部</em>
					</div>
					<div class="div4 clearfix">
						<span class="span4">转化率</span>
						<em id="index-type6" onclick="xtype0([{value: 0,text: '全部'}, {value: 1,text: '0'}, {value: 2,text: '0-20%'}, {value: 3,text: '20%-40%'}, {value: 4,text: '40%-60%'}, {value: 5,text: '60%-80%'}, {value: 6,text: '80%-100%'}],'#index-type6');" class="em4">全部</em>
					</div>
					<div class="div4 clearfix">
						<span class="span4">平均到店时间</span>
						<em id="index-type7" onclick="xtype0([{value: 0,text: '全部'}, {value: 1,text: '1周以内'}, {value: 2,text: '2周'}, {value: 3,text: '2周-1个月'}, {value: 4,text: '1-2个月'}, {value: 5,text: '2-3个月'}, {value: 6,text: '3个月以上'}],'#index-type7');" class="em4">全部</em>
					</div>
					<div class="div4 clearfix">
						<span class="span4">是否会员</span>
						<em id="index-type8" onclick="xtype0([{value: 0,text: '全部'}, {value: 1,text: '会员'}, {value: 2,text: '非会员'}],'#index-type8');" class="em4">全部</em>
					</div>
				</div>
				<span onclick="member_lists_all();" class="mui-btn mui-btn-primary queding jianbian3_shengse">确定</span>
				<br/>
				<br/>

				<br/>
			</div>

		</div>

		<!--/********************日期控件**************************/-->
		<!--<link rel="stylesheet" type="text/css" href="css/hgs-date.css" />
		<script src="js/hgs-date.js"></script>-->
		<!--/********************日期控件**************************/-->
		<input id="index-shop-lists-id" type="hidden">
		<input id="index-shop-lists" type="hidden">
		<input id='index-end-date' type="hidden" />
		<input id='index-start-date' type="hidden" />

		<!--/***************************************************/-->

		<script src="js/mui.min.js"></script>
		<script src="js/mui.enterfocus.js"></script>
		<script src="js/app.js"></script>
		<!--<script type="text/javascript" src="js/jsencrypt.min.js"></script>
		<script src="js/md5.js"></script>-->
		<script src="js/crypto-js.js"></script>
		<script src="js/jquery.js"></script>
		<script src="js/mui.picker.min.js"></script>
		<script type="text/javascript" src="js/common.js?ver=20180130"></script>
		<script type="text/javascript" src="js/fuction.js?ver=20180130"></script>
		<script src="js/echarts.js"></script>
		<script src="js/chart-zz-only-noxAxis.js?ver=20180130"></script>
		<script src="js/chart-zz-only-noxAxis-offset.js?ver=20180130"></script>
		<!--//只有柱状并且没有y轴线图	-->
		<script src="js/chart-pie-only.js"></script>
		<!--//只有圆环	-->
		<script src="js/ljq_biaoqiao.js"></script>
		<script type="text/javascript">
			mui.init();
		</script>
		<script>
			//外部参数查询
			var xbxtype = decodeURI(getUrlParam('xbxtype'));		
			var sdate = decodeURI(getUrlParam('sdate'));	
			var edate = decodeURI(getUrlParam('edate'));

		
			var xout = 0;
			var count = 0;
			var pagenum = 10;
			var totalnum = 20;
			var pagesize = Math.floor(totalnum / pagenum);
			user_info.khlb_flag = 0;

			//console.log(user_info);

			$(document).ready(function() {
				$('body').height($('body')[0].clientHeight);
				$(".menu span").click(function() {
					$(this).addClass("active5").siblings().removeClass("active5");
					$(".div_main1").eq($(this).index()).show().siblings().hide();
					$(".huan").eq($(this).index()).show().siblings().hide();
				})

				$(".tiao_shaixuan").click(function() {
					$(".yiye").hide();
					$(".erye").hide();
					$(".sanye").show();
				})
				$(".tiao_sousuo").click(function() {
					$(".yiye").hide();
					$(".sanye").hide();
					$(".erye").show();
					//获取客户搜索历史
					member_history();
				})
				$(".qingkong").click(function() {
					$(".yiye").hide();
					$(".sanye").hide();
					$(".erye").show();
					//获取客户搜索历史清空
					member_history_delete();
				})
				$(".quxiao").click(function() {
					$(".sanye").hide();
					$(".erye").hide();
					$(".yiye").show();
				})
				$(".fanhui").click(function() {
					$(".sanye").hide();
					$(".erye").hide();
					$(".yiye").show();

					$(".menu span").eq(1).addClass("active5").siblings().removeClass("active5");
					$(".huan").eq(1).show().siblings().hide();		
					
					$(".div_main1").eq(1).show().siblings().hide();
				})

				$(".erye .search input").click(function() {
					$(".erye .search em").show();
				})
				$(".erye .search em").click(function() {
					$(".erye .search input").val('');
				})
			})

			var xtype_picker = new mui.PopPicker();
			var shop_picker = new mui.PopPicker();
			var xtoday = GetDateStr(0);


			mui.ready(function() {
				//获取当前的客户数据
				xminereadyload();
				//如果用户第一次进来，未选择门店
				new_firstcomeshop("#list-shop-lists"); //--------------------------------------------------->>>>>>>有门店选择的页面可以要
				//增加门店列表
				new_shoplistadd(shop_picker); //--------------------------------------------------->>>>>>>有门店选择的页面可以要	
				
				if (getQueryString('back') == 1) {
					$("#active5-sykf-1").show();
					$("#active5-khfx-1").hide();
					$("#active5-khfx").removeClass("active5");
					$("#active5-sykf").addClass("active5");
					member_lists();
					return
				}
				if (xbxtype == '会员') {
					screenUserByVIP();
					return
				}


				if((xbxtype =='全部')||(xbxtype =='老客户')||(xbxtype =='新成交')) {
					$("#active5-sykf-1").show();
					$("#active5-khfx-1").hide();
					$("#active5-khfx").removeClass("active5");
					$("#active5-sykf").addClass("active5");
					
					//console.log(sdate);
					//判断传递的查询日期
					(sdate=="null")?sdate=xtoday:sdate=sdate;
					(edate=="null")?edate=xtoday:edate=edate;
					
					
					
					//查询所有客户信息
					user_info.khlb_flag = 1;
					user_info.khlb_search = {
						"user_type": xbxtype,
						"start_date":sdate,
						"end_date":edate,
					};				
					
					(xbxtype=='全部')?xbxtype="所有客户":xbxtype=xbxtype;
					var str1='<em class="em1">'+xbxtype+'</em>';
					$("#buxianshi").append(str1);
					var str2="";
					(sdate==edate)?str2=sdate:str2=sdate+"/"+edate;
					$("#buxianshi").append('<em class="em1">'+str2+'</em>');
				} else {
					user_info.khlb_flag=0;
					//获取首页信息-数据
					member_dashboard();

				
				}
				

			});

			//选择门店列表
			function user_select_shop() {
				shop_picker.show(function(SelectedItem) {

					//判断用户是绑定门店
					if(SelectedItem[0].value == 999999) {
						window.location.href = "me_user_bind.html";
						return;
					}

					//登录成功，将用户信息进行本地储存
					shop_value_select(SelectedItem[0].text, SelectedItem[0].value);

					//变更显示的门店标签
					mui("#list-shop-lists")[0].innerHTML = user_info.look_shop_name;
					mui("#index-shop-lists-id")[0].value = user_info.look_shop_id;

					//获取首页信息-数据
					member_dashboard();
				})

			}

			//获取客户模块------------------------------------------------------获取客户分析数据
			function member_dashboard() {
				$("#buxianshi").html("");	
									
				var xbx = {}; //登录后的参数对象AES加密
				xbx.shop_id = user_info.look_shop_id; //是 店铺ID---2

				official_login_after(url_host + 'member/dashboard', xbx, 'member_dashboard');
			}

			//获取门店列表
			function shop_lists() {
				var xbx = {}; //登录后的参数对象AES加密
				official_login_after(url_host + 'shop/lists', xbx, 'shop_lists_index');

			};

			//获取客户模块------------------------------------------------------获取客户列表-条件查询
			function member_lists_all() {
			
				user_info.khlb_search = {
					"user_type": [mui("#index-type0")[0].innerHTML],
					"gender": [mui("#index-type1")[0].innerHTML],
					"consumption_sequence": [mui("#index-type2")[0].innerHTML],
					"age": [mui("#index-type3")[0].innerHTML],
					"total_consumption": [mui("#index-type4")[0].innerHTML],
					"last_order_time": [mui("#index-type5")[0].innerHTML],
					"conversion_rate": [mui("#index-type6")[0].innerHTML],
					"average_visit_time": [mui("#index-type7")[0].innerHTML],
					"is_member": [mui("#index-type8")[0].innerHTML],
					'start_date': sdate!='null'&& sdate != 'undefined'?sdate:null,
					'end_date': edate != 'null' && edate != 'undefined' ? edate : null
				};
				user_info.khlb_flag=1;
				$(".huan").eq(1).show().siblings().hide();
				$(".menu span").eq(1).addClass("active5").siblings().removeClass("active5");
				$(".buxianshi").show();
				mui("#buxianshi")[0].innerHTML = "";

				var xxstr = '';
				var he = '';
				var count = 0;
				mui.each(user_info.khlb_search, function(index, item) {
					var xyx = user_info.khlb_search[index];
					if (index!= 'start_date' && index!= 'end_date') {
						if (xyx && xyx != 'null' && xyx != '全部' && xyx != '不可选') {
							xxstr += '<em class="em1">' + xyx + '</em>';
							count++;
						}
					}else{
						if (index == 'start_date') {
							
							if (xyx && xyx != 'null' && xyx != '全部' && xyx != '不可选') {
								var endstr = user_info.khlb_search['end_date']&& user_info.khlb_search['end_date']!='undefined' && user_info.khlb_search['end_date'] != 'null' && user_info.khlb_search['end_date'] != user_info.khlb_search['start_date']?('-' + user_info.khlb_search['end_date']):''
								xxstr += '<em class="em1">' + xyx + endstr + '</em>';
								count++;
							}
							user_info.khlb_search['end_date'] = user_info.khlb_search['start_date']
						}
					}
					

				});
				if (count > 0) {
					xxstr += '<img class="clearBtn" src="./img/clearBtn.png" onclick="clearSearchEvent()"></img>';
				}

				mui("#buxianshi")[0].innerHTML = xxstr;

				if (mui('.clearBtn')[0]) {
					mui('.clearBtn')[0].addEventListener('tap', clearSearchEvent);
				}

				xout = 0;
				count = 0;
				pagenum = 10;
				totalnum = 50;
				pagesize = Math.floor(totalnum / pagenum);

				$("#box_merber_lists").html("");
				mui('#pullrefresh').pullRefresh().refresh(true);
				searchRefresh();
			}

			//获取客户模块------------------------------------------------------获取客户列表-全部
			function member_lists() {
				$('.fetchmark').show();
				mui("#buxianshi")[0].innerHTML = "";
				user_info.khlb_search = {
					"user_type": ["全部"]
				};
				user_info.khlb_flag=1;

				xout = 0;
				count = 0;
				pagenum = 10;
				totalnum = 50;
				pagesize = Math.floor(totalnum / pagenum);

				$("#box_merber_lists").html("");
				mui('#pullrefresh').pullRefresh().refresh(true);
				searchRefresh();
			}

			//获取客户模块------------------------------------------------------获取客户列表-模糊查询
			function member_lists_input(str_search) {
				user_info.khlb_search = {
					"search": str_search,
					"user_type": [mui("#index-type0")[0].innerHTML],
					"gender": [mui("#index-type1")[0].innerHTML],
					"consumption_sequence": [mui("#index-type2")[0].innerHTML],
					"age": [mui("#index-type3")[0].innerHTML],
					"total_consumption": [mui("#index-type4")[0].innerHTML],
					"last_order_time": [mui("#index-type5")[0].innerHTML],
					"conversion_rate": [mui("#index-type6")[0].innerHTML],
					"average_visit_time": [mui("#index-type7")[0].innerHTML],
					"is_member": [mui("#index-type8")[0].innerHTML],
				};
				user_info.khlb_flag=1;

				xout = 0;
				count = 0;
				pagenum = 10;
				totalnum = 50;
				pagesize = Math.floor(totalnum / pagenum);

				$("#box_merber_lists").html("");
				mui('#pullrefresh').pullRefresh().refresh(true);
				searchRefresh();
			}

			//获取客户模块------------------------------------------------------获取客户列表
			function member_lists_search(count, pagenum) {
				var xbx = {}; //登录后的参数对象AES加密
				xbx.shop_id = user_info.look_shop_id; //是 店铺ID---2				
				xbx.page = count;
				xbx.limit = pagenum;
				//user_info.khlb_search= {"user_type": ["全部"]};
				xbx.search = user_info.khlb_search;
				//console.log(user_info);
				$('.fetchmark').show();
				official_login_after(url_host + 'member/lists', xbx, 'member_lists');
			}

			function input_search() {
				var xx = mui("#xxxx")[0].value;
				member_lists_input(xx);
				$(".sanye").hide();
				$(".erye").hide();
				$(".yiye").show();
				$(".buxianshi").show();
			}

			//			获取客户列表历史记录
			//请求地址：/member/history
			//请求参数：
			//序号	名称	字段类型	是否必填	说明
			//2	shop_id		是	店铺ID
			function member_history() {
				var xbx = {}; //登录后的参数对象AES加密
				xbx.shop_id = user_info.look_shop_id; //是 店铺ID---2				

				official_login_after(url_host + 'member/history', xbx, 'member_history');
			}
			//清空客户列表历史记录
			//请求地址：/member/history/delete
			//请求参数：
			//序号	名称	字段类型	是否必填	说明
			//1	shop_id		是	店铺ID
			function member_history_delete() {
				var xbx = {}; //登录后的参数对象AES加密
				xbx.shop_id = user_info.look_shop_id; //是 店铺ID---2	

				official_login_after(url_host + 'member/history/delete', xbx, 'member_history_delete');

			}

			//vip筛选
			function screenUserByVIP() {
				mui("#index-type0")[0].innerHTML = "全部";
				mui("#index-type1")[0].innerHTML = "全部";
				mui("#index-type2")[0].innerHTML = "全部";
				mui("#index-type3")[0].innerHTML = "全部";
				mui("#index-type4")[0].innerHTML = "全部";
				mui("#index-type5")[0].innerHTML = "全部";
				mui("#index-type6")[0].innerHTML = "全部";
				mui("#index-type7")[0].innerHTML = "全部";
				mui("#index-type8")[0].innerHTML = '会员';
				member_lists_all();
			}

			//清空搜索条件
			function clearSearchEvent() {
				mui("#buxianshi")[0].innerHTML = "";
				$(".buxianshi").hide();

				sdate=null;
				edate=null;

				mui("#index-type0")[0].innerHTML = "全部";
				mui("#index-type1")[0].innerHTML = "全部";
				mui("#index-type2")[0].innerHTML = "全部";
				mui("#index-type3")[0].innerHTML = "全部";
				mui("#index-type4")[0].innerHTML = "全部";
				mui("#index-type5")[0].innerHTML = "全部";
				mui("#index-type6")[0].innerHTML = "全部";
				mui("#index-type7")[0].innerHTML = "全部";
				mui("#index-type8")[0].innerHTML = '全部';
				member_lists_all();
			}

			//xtype0
			function xtype0(obj_obj, obj_name) {
				//console.log(obj_obj);
				//这是初始化时间维度
				xtype_picker.setData(obj_obj);
				xtype_picker.show(function(SelectedItem) {
					console.log(obj_name)
					if (obj_name == '#index-type0') {
						if (SelectedItem[0].text=='访客') {
							$('#index-type2').parent().addClass('noway');
							$('#index-type4').parent().addClass('noway');
							$('#index-type5').parent().addClass('noway');
							$('#index-type6').parent().addClass('noway');

							$('#index-type2').html('不可选');
							$('#index-type4').html('不可选');
							$('#index-type5').html('不可选');
							$('#index-type6').html('不可选');
						}else if(SelectedItem[0].text == '新成交'){
							$('#index-type2').parent().addClass('noway');
							$('#index-type2').html('不可选');

							$('#index-type4').parent().removeClass('noway');
							$('#index-type5').parent().removeClass('noway');
							$('#index-type6').parent().removeClass('noway');
							$('#index-type4').html('全部');
							$('#index-type5').html('全部');
							$('#index-type6').html('全部');
						}else{
							$('#index-type2').parent().removeClass('noway');
							$('#index-type4').parent().removeClass('noway');
							$('#index-type5').parent().removeClass('noway');
							$('#index-type6').parent().removeClass('noway');
							$('#index-type2').html('全部');
							$('#index-type4').html('全部');
							$('#index-type5').html('全部');
							$('#index-type6').html('全部');
						}
					}
					mui(obj_name)[0].innerHTML = SelectedItem[0].text;
				});
			}

			$(document).ready(function() {
				$(".head2 .span2").click(function() {
					$(".yinying").show();
					$(".xialakuang").show();
				});
				$(".yinying").click(function() {
					$(".yinying").hide();
					$(".xialakuang").hide();
				});

			})
		</script>

		<script>
			mui.init({
				pullRefresh: {
					container: '#pullrefresh',
					up: {
						contentrefresh: '正在加载...',
						callback: pullupRefresh
					}
				}
			});

			/**
			 * 上拉加载具体业务实现
			 */
			function pullupRefresh() {
				setTimeout(function() {
					mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > pagesize)); //参数为true代表没有更多数据了。

					//获取客户列表
					if(user_info.khlb_flag==1){
						member_lists_search(count, pagenum);
					}
					//

				}, 800);
			}
			/**
			 * 刷新筛选
			 */
			function searchRefresh() {
				setTimeout(function() {
					mui('#pullrefresh').pullRefresh().endPullupToRefresh((count > pagesize)); //参数为true代表没有更多数据了。

					//获取客户列表
					if(user_info.khlb_flag==1){
						member_lists_search(0, pagenum);
					}
					//

				}, 800);
			}
			if(mui.os.plus) {
				mui.plusReady(function() {
					setTimeout(function() {
						mui('#pullrefresh').pullRefresh().pullupLoading();
					}, 1000);

				});
			} else {
				mui.ready(function() {
					mui('#pullrefresh').pullRefresh().pullupLoading();
				});
			}
			$(function() {
				//mui触屏点击
				$("#pullrefresh").on('tap', 'li', function(event) {
					var url = $(this).attr("data-url");
					location.href = url;
				});
			});
		</script>
	</body>

</html>